import React from 'react';
import { format } from '@/utils/datetime';
import { renderNumber } from '@/utils/common';
import CommonPage from '@/components/page/CommonPage';
const daoName = 'ShIndiFbblczsdr';
const importName = 'ShIndiFbblczsdr';
const columns: API.Column[] = [
  {
    title: '产品代码',
    width: 120,
    sorter: true,
    dataIndex: 'CPDM',
    key: 'CPDM',
    dispaly: true,
    filter: true,
    export: true,
  },
  {
    title: '入账日期',
    width: 120,
    sorter: true,
    key: 'SJRQ',
    dataIndex: 'SJRQ',
    render: (data) => format(data, 'yyyy-MM-dd'),
    dispaly: true,
    filter: true,
    export: true,
  },
  {
    title: '分配管理费',
    width: 100,
    sorter: true,
    dataIndex: 'ZSJE',
    render: (data) => renderNumber('.2f', data),
    key: 'ZSJE',
    dispaly: true,
    filter: true,
    export: true,
    align: 'right',
  },
  {
    title: '分配起始日',
    width: 120,
    sorter: true,
    key: 'QGR',
    dataIndex: 'QGR',
    render: (data) => format(data, 'yyyy-MM-dd'),
    dispaly: true,
    filter: true,
    export: true,
  },
  {
    title: '分配截止日',
    width: 120,
    sorter: true,
    key: 'JZR',
    dataIndex: 'JZR',
    render: (data) => format(data, 'yyyy-MM-dd'),
    dispaly: true,
    filter: true,
    export: true,
  },
];
const controls: API.Control[] = [
  { name: 'CPDM', type: 'text', label: '产品代码', grid: 12 / 24 },
  { name: 'SJRQ', label: '入账日期', dataType: 'date', type: 'date', grid: 12 / 24 },
  { name: 'ZSJE', type: 'number', label: '分配管理费', grid: 12 / 24 },
  { name: 'QGR', label: '分配起始日', dataType: 'date', type: 'date', grid: 12 / 24 },
  { name: 'JZR', label: '分配截止日', dataType: 'date', type: 'date', grid: 12 / 24 },
];
const ShIndiFbblczsdrForm: React.FC = () => {
  return (
    <CommonPage
      daoName={daoName}
      columns={columns}
      controls={controls}
      title="零售非保本理财中收"
      importName={importName}
      importControls={controls}
      importMode="DeleteAfterInsert"
      importParamNames={['SJRQ']}
      importTemplateName="零售非保本理财中收导入"
      initSorter={{ FieldName: 'SJRQ', Direction: 'DESC' }}
    />
  );
};

export default ShIndiFbblczsdrForm;
